var enablemenu=false;
function contextover(obj,x,y) {
      obj.style.borderTop = "1px solid white";
      obj.style.borderBottom = "1px solid white";
      obj.style.borderLeft = "1px solid white";
      obj.style.borderRight = "1px solid white";
      obj.style.backgroundColor="ActiveCaption"
	  obj.style.color="white"
      if(enablemenu){
          setContextMenu(x,y)
      }
}  
function contextover1(obj) {
      obj.style.borderTop = "1px solid #ffffff";
      obj.style.borderBottom = "1px solid #888888";
      obj.style.borderLeft = "1px solid #ffffff";
      obj.style.borderRight = "1px solid #888888";
}  

function contextout(obj) {
      obj.style.borderTop ="1px solid buttonface";
      obj.style.borderBottom ="1px solid buttonface";
      obj.style.borderLeft ="1px solid buttonface";
      obj.style.borderRight ="1px solid buttonface";
      obj.style.backgroundColor="buttonface";
	  obj.style.color="black"
}
function contextout1(obj) {
      obj.style.borderTop ="1px solid buttonface";
      obj.style.borderBottom ="1px solid buttonface";
      obj.style.borderLeft ="1px solid buttonface";
      obj.style.borderRight ="1px solid buttonface";
}

function contextclick(x,y){
    enablemenu=true;
    setContextMenu(x,y);

}

function menuclick(value,obj){
	obj.style.borderTop="1px solid buttonshadow";
	obj.style.borderBottom="1px solid buttonhighlight";
	obj.style.borderLeft="1px solid buttonshadow";
	obj.style.borderRight="1px solid buttonhighlight";
	switch(value){
		case 0:
			document.all.frmPage.src="ma.htm";
			break;
		case 1:
			document.all.frmPage.src="ma.htm";
			break;
		case 2:
			document.all.frmPage.src="ma.htm";
			break;
		case 3:
			document.all.frmPage.src="ma.htm";
			break;
		case 4:
			document.all.frmPage.src="ma.htm";
			break;
		case 5:
			document.all.frmPage.src="ma.htm";
			break;
		case 6:
			document.all.frmPage.src="ma.htm";
			break;
		case 7:
			document.all.frmPage.src="ma.htm";
			break;
		case 8:
			document.all.frmPage.src="ma.htm";
			break;																					
			
	}
}

function toolbarclick(value,obj){
	obj.style.borderTop="1px solid buttonshadow";
	obj.style.borderBottom="1px solid buttonhighlight";
	obj.style.borderLeft="1px solid buttonshadow";
	obj.style.borderRight="1px solid buttonhighlight";
	switch(value){
		case 0:
			prevPage("MainContext");
			//parent.frames["contentFrame"].window.history.go(-1);
			//document.all.Tool.style.left=86;
			break;
		case 1:
			nextPage("MainContext");
			//parent.frames["contentFrame"].window.history.go(1);
			//document.all.Tool.style.left=258+value*76;
			break;
		case 2:
			//document.all.Tool.style.left=258+value*76;
			break;
		case 3://全屏
			fullScreen();
			break;
		case 4:
			//parent.getFrameObj('contentFrame').window.location.reload();
			//parent.frames["contentFrame"].window.location.reload();
			refreshPage("MainContext");
			break;
		case 5:
			window.print();
			break;
		case 6:
			alert('应用尚未加载');
			break;
		case 7:
			alert('应用尚未加载');
			break;
		case 8:
			alert('应用尚未加载');
			break;		
		case 9:
			alert('应用尚未加载');
			break;
		case 10:
			alert('应用尚未加载');
			break;
		case 11:
			top.window.location = "logout.jsp";
			break;
		case 12:
			top.window.open("/CHAT_RES?res=help") ;
			break;
		default:
			break;
	}
}

//将工作区放大,满屏显示
function fullScreen(){
	parent.isMaxScreen = parent.isMaxScreen==false?true:false;
	if(parent.isMaxScreen){
		parent.getFrameObj('appFrame').rows="0,*";
		parent.isShowNavigate = true; 
		parent.adjustNavigateFrame();
	}else{
		parent.getFrameObj('appFrame').rows="30,*";
		parent.isShowNavigate = false;
		parent.adjustNavigateFrame();
	}
}